package com.ruoyi.mixuebingcheng.domain.bo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户信息业务对象 user
 *
 * @author ruoyi
 * @date 2023-10-27
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class UserBo extends BaseEntity {
    private Long xuewang;

    /**
     * 主键
     */

    private Long id;

    /**
     * 姓名
     */
    @NotBlank(message = "姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空", groups = { AddGroup.class })
    private String password;

    /**
     * 手机号
     */
    @Pattern(regexp = "^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|(147))\\d{8}$",message = "请输入正确格式手机号",groups = {EditGroup.class})
    private String phone;

    /**
     * 性别
     */

    private String sex;

    /**
     * 身份证号
     */

    private String idNumber;

    /**
     * 头像
     */

    private String avatar;

    /**
     * 是否删除
     */

    private Long isDeleted;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date qiandao;
}
